<template>
    <div>
        <el-dialog
                id="pricesDialog1"
                title="新建宝石"
                :visible.sync="dialogshow"
                :before-close="dialogClose"
                style="display: none"
                top="10vh"
                width="90%"
                :fullscreen="fullscreen"
        >
            <dialog-tools
                    v-bind:back="true"
                    v-bind:next="true"
                    v-bind:goback="true"
                    v-bind:prev="true"
                    v-bind:screen="true"
                    @clickfullscreen="clickfullscreen"
            >
            </dialog-tools>
            <el-form
                    id="form-baoji"
                    size="mini"
                    :model="formData"
                    label-width="100px"
                    style="height: 500px; overflow: auto;"
                    label-position="top"
                    :inline="true"
            >
                <el-tabs
                        class="baojia-tabs"
                        type="border-card"
                        style="padding-left: 10px; padding-right: 10px"
                >
                    <el-tab-pane label="详情">
                        <el-row>
                            <el-col :span="21">
                                <el-row>
                                    <el-col :span="3">
                                        <el-form-item label="证书编码">
                                            <el-input
                                                    v-model="customer.customercode"
                                                    auto-complete="off"

                                            ></el-input>
                                        </el-form-item>
                                    </el-col
                                    >

                                    <el-col :span="3">
                                        <el-form-item label="物品名称" prop="creditrank">
                                            <el-input
                                                    v-model="customer.certificateno"
                                                    auto-complete="off"
                                            ></el-input>
                                        </el-form-item>
                                    </el-col
                                    >
                                    <el-col :span="3">
                                        <el-form-item label="物品品类">
                                            <el-select
                                                    v-model="customer.customercate"
                                                    filterable
                                                    style="width: 100%"
                                            >
                                                <el-option label="钻石" value="A"></el-option>
                                                <el-option label="红宝石" value="B"></el-option>
                                                <el-option label="蓝宝石" value="C"></el-option>
                                                <el-option label="主母绿" value="D"></el-option>
                                            </el-select>
                                        </el-form-item>
                                    </el-col
                                    >
                                    <el-col :span="3">
                                        <el-form-item label="级别">
                                            <el-cascader
                                                    v-model="customer.annualsales"
                                                    :options="fieldGgccOptions"
                                                    :props="fieldGgccOptions"
                                                    style="width: 100px"
                                                    placeholder="请选择"
                                                    clearable
                                            ></el-cascader>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="3">
                                        <el-form-item label="形状">
                                            <el-input
                                                    v-model="customer.annualsales"
                                                    auto-complete="off"
                                            ></el-input>
                                        </el-form-item>
                                    </el-col
                                    >
                                    <el-col :span="3">
                                        <el-form-item label="规格">
                                            <el-input
                                                    v-model="customer.annualsales"
                                                    auto-complete="off"
                                            ></el-input>
                                        </el-form-item>
                                    </el-col>
                                </el-row>

                                <el-row>
                                    <el-col :span="3">
                                        <el-form-item label="尺寸">
                                            <el-input
                                                    v-model="customer.customercode"
                                                    auto-complete="off"

                                            ></el-input>
                                        </el-form-item>
                                    </el-col
                                    >

                                    <el-col :span="3">
                                        <el-form-item label="颜色" prop="creditrank">
                                            <el-input
                                                    v-model="customer.certificateno"
                                                    auto-complete="off"
                                            ></el-input>
                                        </el-form-item>
                                    </el-col
                                    >
                                    <el-col :span="3">
                                        <el-form-item label="切工">
                                            <el-select
                                                    v-model="customer.customercate"
                                                    filterable
                                                    style="width: 100%"
                                            >
                                                <el-option label="玫瑰切割" value="A"></el-option>
                                                <el-option label="马眼切割" value="B"></el-option>
                                                <el-option label="心形切割" value="C"></el-option>
                                                <el-option label="圆形切割" value="D"></el-option>
                                            </el-select>
                                        </el-form-item>
                                    </el-col
                                    >
                                    <el-col :span="3">
                                        <el-form-item label="产地">
                                            <el-cascader
                                                    v-model="customer.annualsales"
                                                    :options="fieldGgccOptions"
                                                    :props="fieldGgccOptions"
                                                    style="width: 100px"
                                                    placeholder="请选择"
                                                    clearable
                                            ></el-cascader>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="3">
                                        <el-form-item label="单位">
                                            <el-input
                                                    v-model="customer.annualsales"
                                                    auto-complete="off"
                                            ></el-input>
                                        </el-form-item>
                                    </el-col
                                    >
                                    <el-col :span="3">
                                        <el-form-item label="单位数量">
                                            <el-input
                                                    v-model="customer.annualsales"
                                                    auto-complete="off"
                                            ></el-input>
                                        </el-form-item>
                                    </el-col>
                                </el-row>

                                <el-row>
                                    <el-col :span="3">
                                        <el-form-item label="单位克拉重">
                                            <el-input
                                                    v-model="customer.customercode"
                                                    auto-complete="off"

                                            ></el-input>
                                        </el-form-item>
                                    </el-col
                                    >

                                    <el-col :span="3">
                                        <el-form-item label="单位克重" prop="creditrank">
                                            <el-input
                                                    v-model="customer.certificateno"
                                                    auto-complete="off"
                                            ></el-input>
                                        </el-form-item>
                                    </el-col
                                    >

                                    <el-col :span="3">
                                        <el-form-item label="保质期">
                                            <el-cascader
                                                    v-model="customer.annualsales"
                                                    :options="fieldGgccOptions"
                                                    :props="fieldGgccOptions"
                                                    style="width: 100px"
                                                    placeholder="请选择"
                                                    clearable
                                            ></el-cascader>
                                        </el-form-item>
                                    </el-col>

                                </el-row>
                            </el-col>
<!--                            <el-col :span="3" class="col-sum">-->
<!--                                <div>单价：200000元</div>-->
<!--                                <div>总价：99999999元</div>-->
<!--                            </el-col>-->
                        </el-row>
                        <el-divider></el-divider>

                        <el-row>
                            <el-col :span="20">

                                <el-form-item label="仓位选择">
                                    <el-cascader
                                            v-model="customer.annualsales"
                                            :options="fieldGgccOptions2"
                                            :props="fieldGgccOptions2"
                                            style="width: 100px"
                                            placeholder="请选择"
                                            clearable
                                    ></el-cascader>
                                </el-form-item>

                                <!-- 客户提供 为是 显示  声明价值   否时显示单价和总价 另一个隐藏-->
                                <el-form-item label="数量（件）" prop="field113">
                                    <el-input
                                            v-model="formData.field113"
                                            placeholder="录入件数"
                                            style="width: 80px"
                                    ></el-input>
                                </el-form-item>

                            </el-col
                            >
                            <el-col :span="1" class="col-button">
                                <el-tooltip content="确定添加" placement="bottom">
                                    <el-button
                                            type="primary"
                                            icon="el-icon-plus"
                                            size="mini"
                                    ></el-button>
                                </el-tooltip>

                            </el-col
                            >
                            <!--                            <el-col :span="3" class="col-sum"-->
                            <!--                            >-->
                            <!--                                <div class="sum-xj">小计：200000元</div>-->
                            <!--                            </el-col>-->
                        </el-row
                        >

                        <el-row>
                            <div
                                    @click="showTableCw = !showTableCw"
                                    style="
                  folat: right;
                  width: 100%;
                  font-size: 16px;
                  cursor: pointer;
                "
                            >
                                <el-row
                                >
                                    <el-col :span="3">已录入 3个仓位
                                    </el-col
                                    >
                                    <el-col :span="3">总数量 10件
                                    </el-col
                                    >
                                    <el-col :span="3">总重量 200.005克拉
                                    </el-col
                                    >
                                    <el-col :span="3">&nbsp;
                                    </el-col
                                    >
                                    <el-col :span="3">&nbsp;
                                    </el-col
                                    >
                                    <el-col :span="3">&nbsp;
                                    </el-col
                                    >
                                    <el-col :span="1">&nbsp;
                                    </el-col
                                    >
                                    <el-col :span="3"
                                    >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i
                                            class="el-icon-view el-icon--right"
                                    ></i>
                                        查看详情
                                    </el-col
                                    >
                                </el-row
                                >
                            </div>
                        </el-row>


                        <el-row
                        >
                            <el-col :span:="24">
                                <el-table
                                        v-if="showTableCw"
                                        ref="multipleTable"
                                        stripe
                                        :data="tableDataCw"
                                        :show-summary="false"
                                        border
                                        show-summary
                                        row-class-name="tableRow"
                                        header-row-class-name="tableHeader"
                                        :highlight-current-row="true"
                                        @row-dblclick="dialogClose"
                                        style="width: 100%; border-top: 1px solid #c5c5c5"
                                >
                                    <el-table-column
                                            type="selection"
                                            width="60"
                                    ></el-table-column>
                                    <el-table-column
                                            prop="id"
                                            label="序号"
                                            width="50"
                                    ></el-table-column>
                                    <el-table-column
                                            prop="name"
                                            label="仓位"
                                            sortable
                                    ></el-table-column>

                                    <el-table-column prop="smjz" label="数量">
                                    </el-table-column>



                                    <el-table-column width="80">
                                        <template slot="header" slot-scope="scope">
                                            <el-tooltip content="删除选中" placement="bottom">
                                                <el-button
                                                        @click="dialogAdd"
                                                        type="danger"
                                                        icon="el-icon-delete"
                                                        size="mini"
                                                >
                                                </el-button>
                                            </el-tooltip>
                                        </template>
                                        <template slot-scope="scope">
                                            <el-tooltip content="删除" placement="bottom">
                                                <el-button
                                                        @click="dialogAdd"
                                                        type="danger"
                                                        icon="el-icon-delete"
                                                        size="mini"
                                                >
                                                </el-button>
                                            </el-tooltip>
                                        </template>
                                    </el-table-column>
                                </el-table>
                            </el-col
                            >
                        </el-row>

                        <el-divider></el-divider>



                        <el-row style="margin-top: 5px">
                            <el-input
                                    type="textarea"
                                    v-model="customer.name"
                                    placeholder="备注"
                            ></el-input>
                        </el-row>
                    </el-tab-pane>
                    <el-tab-pane label="图片/视频">
                        <el-row style="margin-top: 20px;margin-bottom: 20px;">
                            <upload-img-list></upload-img-list>
                        </el-row>

                        <el-row class="upload-row">
                            <el-col :span="3"
                            >
                                <el-form-item>
                                    <el-upload
                                            class="upload-demo"
                                            action="https://jsonplaceholder.typicode.com/posts/"
                                            :on-preview="handlePreview"
                                            :on-remove="handleRemove"
                                            :before-remove="beforeRemove"
                                            multiple
                                            :limit="3"
                                            :on-exceed="handleExceed"
                                    >
                                        <el-button size="small" type="primary">证书</el-button>
                                        <div slot="tip" class="el-upload__tip">
                                            <!-- 只能上传jpg/png文件，且不超过500kb -->
                                        </div>
                                    </el-upload>
                                </el-form-item>
                            </el-col
                            >
                            <el-col :span="3"
                            >
                                <el-form-item>
                                    <el-upload
                                            class="upload-demo"
                                            action="https://jsonplaceholder.typicode.com/posts/"
                                            :on-preview="handlePreview"
                                            :on-remove="handleRemove"
                                            :before-remove="beforeRemove"
                                            multiple
                                            :limit="3"
                                            :on-exceed="handleExceed"
                                    >
                                        <el-button size="small" type="primary">图片</el-button>
                                        <div slot="tip" class="el-upload__tip">
                                            <!-- 只能上传jpg/png文件，且不超过500kb -->
                                        </div>
                                    </el-upload>
                                </el-form-item>
                            </el-col
                            >
                            <el-col :span="3"
                            >
                                <el-form-item>
                                    <el-upload
                                            class="upload-demo"
                                            action="https://jsonplaceholder.typicode.com/posts/"
                                            :on-preview="handlePreview"
                                            :on-remove="handleRemove"
                                            :before-remove="beforeRemove"
                                            multiple
                                            :limit="3"
                                            :on-exceed="handleExceed"
                                    >
                                        <el-button size="small" type="primary">视频</el-button>
                                        <div slot="tip" class="el-upload__tip">
                                            <!-- 只能上传jpg/png文件，且不超过500kb -->
                                        </div>
                                    </el-upload>
                                </el-form-item>
                            </el-col
                            >

                            <el-col :span="3"
                            >
                                <el-form-item>
                                    <el-upload
                                            class="upload-demo"
                                            action="https://jsonplaceholder.typicode.com/posts/"
                                            :on-preview="handlePreview"
                                            :on-remove="handleRemove"
                                            :before-remove="beforeRemove"
                                            multiple
                                            :limit="3"
                                            :on-exceed="handleExceed"
                                    >
                                        <el-button size="small" type="primary">其它图片</el-button>
                                        <div slot="tip" class="el-upload__tip">
                                            <!-- 只能上传jpg/png文件，且不超过500kb -->
                                        </div>
                                    </el-upload>
                                </el-form-item>
                            </el-col
                            >
                            <el-col :span="3"
                            >
                                <el-form-item>
                                    <el-upload
                                            class="upload-demo"
                                            action="https://jsonplaceholder.typicode.com/posts/"
                                            :on-preview="handlePreview"
                                            :on-remove="handleRemove"
                                            :before-remove="beforeRemove"
                                            multiple
                                            :limit="3"
                                            :on-exceed="handleExceed"
                                    >
                                        <el-button size="small" type="primary">其它视频</el-button>
                                        <div slot="tip" class="el-upload__tip">
                                            <!-- 只能上传jpg/png文件，且不超过500kb -->
                                        </div>
                                    </el-upload>
                                </el-form-item>
                            </el-col
                            >
                        </el-row>
                        <el-row
                        >
                            <el-col :span="24"
                            >
                            </el-col
                            >
                        </el-row
                        >
                    </el-tab-pane>


                </el-tabs>
            </el-form>
            <div slot="footer" class="dialog-footer">
                <el-dropdown style="float: left; margin-left: 15px">
                    <el-button>
                        关联数据<i class="el-icon-arrow-down el-icon--right"></i>
                    </el-button>
                    <el-dropdown-menu slot="dropdown">
                        <el-dropdown-item>设计图</el-dropdown-item>
                        <el-dropdown-item>客来石</el-dropdown-item>
                        <el-dropdown-item>客来金</el-dropdown-item>
                        <el-dropdown-item>其它...</el-dropdown-item>
                    </el-dropdown-menu>
                </el-dropdown>


                <!-- <el-button type="primary" >报价预览</el-button> -->
                <el-button @click="dialogClose">取 消</el-button>
                <el-button type="primary" @click="dialogAdd">确定</el-button>
            </div>
        </el-dialog>
        <dialog-search-customer
                v-bind:dialogshow="dialogSearchCustomer"
                @dialog_close="dialog_close_search_customer"
        ></dialog-search-customer>
        <dialog-search-product
                v-bind:dialogshow="dialogSearchProduct"
                @dialog_close="dialog_close_search_product"
        ></dialog-search-product>
        <dialog-search-baojia
                v-bind:dialogshow="dialogSearchBaojia"
                @dialog_close="dialog_close_search_baojia"
        ></dialog-search-baojia>
    </div>
</template>

<style scoped>
    .sum-xj {
        margin-top: 15px;
    }

    .baojia-tabs .el-tab-pane {
        min-height: 400px;
    }

    .upload-row .el-col-3 {
        height: 200px;
    }

    .upload-row .el-col-3 button {
        margin-left: 40px;
    }

    .col-sum {
        padding-top: 10px;
        font-size: 18px;
    }

    #form-baoji .el-input {
        width: 90%;
    }

    #form-baoji .el-row {
        margin-bottom: 0px;
    }

    #form-baoji.el-form--label-top .el-form-item__label {
        padding-bottom: 0px;
    }

    #form-baoji .el-divider--horizontal {
        margin: 5px 0;
    }

    .el-col.col-button {
        padding-top: 26px;
    }

    #form-baoji .el-form-item {
        width: auto !important;
        float: left;
        margin-bottom: 5px;
    }

    #customerDialog .el-form-item {
        width: 45%;
        float: left;
        margin-bottom: 5px;
    }

    #customerDialog .el-form-item:nth-child(odd) {
        float: right;
    }

    .el-dialog__body,
    .el-form {
        overflow: hidden;
    }

    #form-baoji .el-form {
        border: 0 solid #fff !important;
        padding: 5px;
        margin-top: 10px;
        margin-bottom: 10px;
    }

    .td-lable,
    .td-info {
        display: inline-table;
        vertical-align: -webkit-baseline-middle;
    }

    .td-lable {
        text-align: right;
        width: 100px;
    }

    .td-info {
        margin-left: 20px;
    }

    .tabs-table td {
        height: 50px;
        border-bottom: 1px solid #dcdfe6;
    }

    .customer-tabs .el-tab-pane {
        height: 400px;
        overflow: auto;
        padding: 20px;
    }
</style>

<script>
  module.exports = {
    methods: {
      getSummaries_zs (param) {
        const { columns, data } = param
        const sums = []
        columns.forEach((column, index) => {
          if (index === 0) {
            sums[index] = '总价'
            return
          }
          const values = data.map((item) => Number(item[column.property]))
          if (!values.every((value) => isNaN(value))) {
            sums[index] = values.reduce((prev, curr) => {
              const value = Number(curr)
              if (!isNaN(value)) {
                return prev + curr
              } else {
                return prev
              }
            }, 0)
            sums[index] += ''
          } else {
            sums[index] = ''
          }
        })

        return sums
      },
      handleRemove (file, fileList) {
        console.log(file, fileList)
      },
      handlePreview (file) {
        console.log(file)
      },
      handleExceed (files, fileList) {
        this.$message.warning(
          `当前限制选择 3 个文件，本次选择了 ${files.length} 个文件，共选择了 ${
          files.length + fileList.length
            } 个文件`
        )
      },
      beforeRemove (file, fileList) {
        return this.$confirm(`确定移除 ${file.name}？`)
      },

      dialogAdd () {
        this.$confirm('是否继续操作?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning',
        })
          .then(() => {
            this.$message({
              type: 'success',
              message: '操作成功!',
            })
          })
          .catch(() => {
            this.$message({
              type: 'info',
              message: '已取消',
            })
          })
      },
      dialogClose () {
        this.$emit('dialog_close', 1)
      },
      clickfullscreen () {
        this.fullscreen = !this.fullscreen
      },
      //跟进
      dialog_close_genji_customer (val) {
        console.log(val)
        this.dialogCustomerGenji = false
      },
      dialog_close_search_customer (val) {
        console.log(val)
        this.dialogSearchCustomer = false
      },
      dialog_close_search_product (val) {
        console.log(val)
        this.dialogSearchProduct = false
      },
      dialog_close_search_baojia (val) {
        console.log(val)
        this.dialogSearchBaojia = false
      },

      handleButtons (val) {
        console.log(2222)
        switch (val) {
          case 'product':
            console.log(333)
            this.dialogSearchProduct = 'true'
            console.log(this.dialogSearchProduct)
            break
          case 'baojia':
            console.log(333)
            this.dialogSearchBaojia = 'true'
            console.log(this.dialogSearchBaojia)
            break
          case 1:
            this.dialogSendMessage = 'true'
            console.log(this.dialogSendMessage)
            break
          case 2:
            console.log(333)
            this.dialogSearchCustomer = 'true'
            console.log(this.dialogSearchCustomer)
            break
          case 3:
            console.log(333)
            this.dialogSearchProduct = 'true'
            console.log(this.dialogSearchProduct)
            break

          case 10:
            console.log(333)
            this.dialogCustomerInfo = 'false'
            this.dialogCustomerGenji = 'true'
            console.log(this.dialogCustomerGenji)
            break
        }
      },
      addData () {
        this.tableDatas.push({
          edit: true,
        })
      },
      //确认添加
      confirmAdd (row) {
        row.edit = false
      },
      //修改
      editData (row) {
        row.edit = true
      },
      //删除
      deleteData (row, index) {
        this.tableDatas.splice(index, 1)
      },
    },
    props: ['dialogshow'],
    data () {
      return {
        showTableZs: false,
        showTableCw: true,
        showTableFs: false,
        showTableGjs: false,
        showTablePj: false,
        activeName: 'first',
        dialogSendMessage: false,
        dialogCustomerInfo: false,
        dialogCustomerGenji: false,
        dialogSearchCustomer: false,
        dialogSearchProduct: false,
        dialogSearchBaojia: false,
        // dialogshow:false,
        fullscreen: false,
        customer: {
          name: '',
          customercode: '',
          customerstatus: '',
          customercate: '',
          creditrank: '',
          creditline: '',
          capital: '',
          annualsales: '',
          bank: '',
          certificateno: '',
          address: '',
          area: '',
          brand: '',
          bankaccount: '',
          trademark: '',
          website: '',
          lperson: '',
          lphone: '',
          contacts: '',

          phone: '',
          phonenum: '',
          weixin: '',
          email: '',
          fax: '',
          resource: '',
          requirement: '',
          ordercountmonth: '',
          purchaseamountmonth: '',
          ordercountyear: '',
          purchaseamountyear: '',
          customerstaffname: '',
          customerstaffcode: '',
          operator: '',
          insertime: '',
          remark: '',
        },
        formData: {
          field101: '',
          field112: 1,
          field105: '',
          field102: '',
          field108: 0,
          field110: '',
          field113: undefined,
          field114: 0,
          field115: 1,
          field118: 0,
          field123: 0,
          field122: 0,
          field206: undefined,
          field212: undefined,
          field170: 2,
          field171: 1,
          field172: '',
          field173: '',
          field174: 0,
          field175: '',
          field177: undefined,
          field178: 0,
          field179: 1,
          field180: 0,
          field181: 0,
          field182: 0,
          field214: undefined,
          field216: undefined,
          field127: [1, '99.984%'],
          field128: '',
          field138: 1,
          field140: 1,
          field135: 6,
          field137: 0,
          field143: undefined,
          field142: 0,
          field144: 1,
          field145: 0,
          field218: undefined,
          field220: undefined,
          field198: '',
          field205: [],
          field188: '',
          field190: '',
          field191: '',
          field189: 1,
          field192: 0,
          field201: 0,
          field195: undefined,
          field194: 0,
          field204: 2,
          field196: 1,
          field202: 0,
          field203: 0,
          field197: 0,
          field224: undefined,
          field226: undefined,
          field2000: undefined,
          field3000: true,
          field3001: true,
          field3002: false,
        },
        rules: {
          field101: [],
          field112: [],
          field105: [],
          field102: [],
          field108: [],
          field110: [],
          field113: [],
          field114: [],
          field115: [],
          field118: [],
          field123: [],
          field122: [],
          field170: [],
          field171: [],
          field172: [],
          field173: [],
          field174: [],
          field175: [],
          field177: [],
          field178: [],
          field179: [],
          field180: [],
          field181: [],
          field182: [],
          field127: [],
          field128: [],
          field138: [],
          field140: [],
          field135: [],
          field137: [],
          field143: [],
          field142: [],
          field144: [],
          field145: [],
          field198: [],
          field205: [],
          field188: [],
          field190: [],
          field191: [],
          field189: [],
          field192: [],
          field201: [],
          field195: [],
          field194: [],
          field204: [],
          field196: [],
          field202: [],
          field203: [],
          field197: [],
          field2000: [],
          field3000: [],
        },
        field101Options: [
          {
            label: '钻石',
            value: 1,
          },
          {
            label: '红宝石',
            value: 2,
          },
          {
            label: '蓝宝石',
            value: 3,
          },
          {
            label: '祖母绿',
            value: 4,
          },
          {
            label: '珍珠',
            value: 5,
          },
          {
            label: '白贝',
            value: 6,
          },
          {
            label: '尖晶石',
            value: 7,
          },
          {
            label: '彩钻石',
            value: 8,
          },
          {
            label: '其他',
            value: 9,
          },
        ],
        field105Options: [
          {
            label: 'D',
            value: 'D',
          },
          {
            label: 'E',
            value: 'E',
          },
          {
            label: 'F',
            value: 'F',
          },
          {
            label: 'G',
            value: 'G',
          },
          {
            label: 'H',
            value: 'H',
          },
          {
            label: 'I',
            value: 'I',
          },
          {
            label: 'J',
            value: 'J',
          },
          {
            label: 'K',
            value: 'K',
          },
          {
            label: 'L',
            value: 'L',
          },
          {
            label: 'M',
            value: 'M',
          },
          {
            label: 'N',
            value: 'N',
          },
        ],
        field102Options: [
          {
            label: 'FL',
            value: 1,
          },
          {
            label: 'IF',
            value: 2,
          },
          {
            label: 'VVS1',
            value: 3,
          },
          {
            label: 'VVS2',
            value: 4,
          },
          {
            label: 'VS1',
            value: 5,
          },
          {
            label: 'VS2',
            value: 6,
          },
          {
            label: 'SI1',
            value: 7,
          },
          {
            label: 'SI2',
            value: 8,
          },
          {
            label: 'P1',
            value: 9,
          },
          {
            label: 'P2',
            value: 10,
          },
          {
            label: 'P3',
            value: 11,
          },
        ],
        field2000Options: [
          {
            label: '圆形',
            value: 1,
          },
          {
            label: '心形',
            value: 2,
          },
          {
            label: '梨形',
            value: 3,
          },
          {
            label: '椭圆形',
            value: 4,
          },
          {
            label: '公主方',
            value: 5,
          },
          {
            label: '玫瑰',
            value: 6,
          },
          {
            label: '马眼',
            value: 7,
          },
          {
            label: '绿术石形',
            value: 8,
          },
          {
            label: '其它',
            value: 9,
          },
        ],
        field110Options: [
          {
            label: '完美',
            value: 1,
          },
          {
            label: '非常好',
            value: 2,
          },
          {
            label: '一般',
            value: 3,
          },
          {
            label: '差',
            value: 4,
          },
        ],

        field115Options: [
          {
            label: '是',
            value: 1,
          },
          {
            label: '否',
            value: 2,
          },
        ],
        field170Options: [
          {
            label: '钻石',
            value: 1,
          },
          {
            label: '红宝石',
            value: 2,
          },
          {
            label: '蓝宝石',
            value: 3,
          },
          {
            label: '祖母绿',
            value: 4,
          },
          {
            label: '珍珠',
            value: 5,
          },
          {
            label: '白贝',
            value: 6,
          },
          {
            label: '尖晶石',
            value: 7,
          },
          {
            label: '彩钻石',
            value: 8,
          },
          {
            label: '其他',
            value: 9,
          },
        ],
        field172Options: [
          {
            label: 'D',
            value: 'D',
          },
          {
            label: 'E',
            value: 'E',
          },
          {
            label: 'F',
            value: 'F',
          },
          {
            label: 'G',
            value: 'G',
          },
          {
            label: 'H',
            value: 'H',
          },
          {
            label: 'I',
            value: 'I',
          },
          {
            label: 'J',
            value: 'J',
          },
          {
            label: 'K',
            value: 'K',
          },
          {
            label: 'L',
            value: 'L',
          },
          {
            label: 'M',
            value: 'M',
          },
          {
            label: 'N',
            value: 'N',
          },
        ],
        field173Options: [
          {
            label: 'FL',
            value: 1,
          },
          {
            label: 'IF',
            value: 2,
          },
          {
            label: 'VVS1',
            value: 3,
          },
          {
            label: 'VVS2',
            value: 4,
          },
          {
            label: 'VS1',
            value: 5,
          },
          {
            label: 'VS2',
            value: 6,
          },
          {
            label: 'SI1',
            value: 7,
          },
          {
            label: 'SI2',
            value: 8,
          },
          {
            label: 'P1',
            value: 9,
          },
          {
            label: 'P2',
            value: 10,
          },
          {
            label: 'P3',
            value: 11,
          },
        ],
        field175Options: [
          {
            label: '圆形',
            value: 1,
          },
          {
            label: '心形',
            value: 2,
          },
          {
            label: '梨形',
            value: 3,
          },
          {
            label: '椭圆形',
            value: 4,
          },
          {
            label: '公主方',
            value: 5,
          },
          {
            label: '玫瑰',
            value: 6,
          },
          {
            label: '马眼',
            value: 7,
          },
          {
            label: '绿术石形',
            value: 8,
          },
          {
            label: '其它',
            value: 9,
          },
        ],
        field179Options: [
          {
            label: '是',
            value: 1,
          },
          {
            label: '否',
            value: 2,
          },
        ],
        field3000Options: [
          {
            label: '是',
            value: 1,
          },
        ],
        field127Options: [
          {
            label: '黄金',
            value: 1,
            id: 101,
            children: [
              {
                label: '千足金99.9%',
                value: '千足金99.9%',
                id: 108,
              },
              {
                label: '万足金99.99%',
                value: '万足金99.99%',
                id: 107,
              },
              {
                label: '24K 99.984%(999‰)',
                value: '99.984%',
                id: 106,
              },
              {
                label: '22k 91.652%(916‰)',
                value: '22k 91.652%(916‰)',
                id: 109,
              },
            ],
          },
          {
            label: '铂金',
            value: '铂金',
            id: 110,
            children: [
              {
                label: 'PT999（99.9%）',
                value: 'PT999',
                id: 111,
              },
              {
                label: 'PT990（99%）',
                value: 'PT990',
                id: 112,
              },
            ],
          },
        ],
        field140Options: [
          {
            label: '件',
            value: 1,
          },
          {
            label: '套',
            value: 2,
          },
          {
            label: '款',
            value: 3,
          },
        ],
        field135Options: [
          {
            label: '红',
            value: 1,
          },
          {
            label: '黄',
            value: 2,
          },
          {
            label: '蓝',
            value: 3,
          },
          {
            label: '黑',
            value: 4,
          },
          {
            label: '白',
            value: 5,
          },
          {
            label: '橙',
            value: 6,
          },
          {
            label: '绿',
            value: 7,
          },
          {
            label: '青',
            value: 8,
          },
          {
            label: '玫瑰金',
            value: 9,
          },
          {
            label: '玫瑰金',
            value: 10,
          },
          {
            label: '其它',
            value: 11,
          },
        ],
        field144Options: [
          {
            label: '是',
            value: 1,
          },
          {
            label: '否',
            value: 2,
          },
        ],
        field198Options: [
          {
            label: '钻石',
            value: 1,
          },
          {
            label: '红宝石',
            value: 2,
          },
          {
            label: '蓝宝石',
            value: 3,
          },
          {
            label: '祖母绿',
            value: 4,
          },
          {
            label: '珍珠',
            value: 5,
          },
          {
            label: '白贝',
            value: 6,
          },
          {
            label: '尖晶石',
            value: 7,
          },
          {
            label: '彩钻石',
            value: 8,
          },
          {
            label: '其他',
            value: 9,
          },
        ],
        field205Options: [
          {
            label: '黄金',
            value: 1,
            id: 101,
            children: [
              {
                label: '千足金99.9%',
                value: '千足金99.9%',
                id: 108,
              },
              {
                label: '万足金99.99%',
                value: '万足金99.99%',
                id: 107,
              },
              {
                label: '24K 99.984%(999‰)',
                value: '99.984%',
                id: 106,
              },
              {
                label: '22k 91.652%(916‰)',
                value: '22k 91.652%(916‰)',
                id: 109,
              },
            ],
          },
          {
            label: '铂金',
            value: '铂金',
            id: 110,
            children: [
              {
                label: 'PT999（99.9%）',
                value: 'PT999',
                id: 111,
              },
              {
                label: 'PT990（99%）',
                value: 'PT990',
                id: 112,
              },
            ],
          },
        ],
        fieldGgccOptions2: [
          {
            label: '仓库A',
            value: 1,
            id: 101,
            children: [
              {
                label: '2-4-1',
                value: '46mm',
                id: 108,
              },
              {
                label: '2-4-2',
                value: '47.5mm',
                id: 107,
              },
              {
                label: '2-4-3',
                value: '48mm',
                id: 106,
              },
              {
                label: '2-4-4',
                value: '50.5mm',
                id: 109,
              },
            ],
          },
          {
            label: '仓库B',
            value: '2',
            id: 110,
            children: [
              {
                label: '3-2-3',
                value: 'PT9991',
                id: 111,
              },
              {
                label: '3-2-4',
                value: 'PT9901',
                id: 112,
              },
            ],
          },
        ],
        fieldGgccOptions: [
          {
            label: '戒指',
            value: 1,
            id: 101,
            children: [
              {
                label: '7',
                value: '46mm',
                id: 108,
              },
              {
                label: '8',
                value: '47.5mm',
                id: 107,
              },
              {
                label: '9',
                value: '48mm',
                id: 106,
              },
              {
                label: '10',
                value: '50.5mm',
                id: 109,
              },
            ],
          },
          {
            label: '项链',
            value: '2',
            id: 110,
            children: [
              {
                label: '2',
                value: 'PT9991',
                id: 111,
              },
              {
                label: '3',
                value: 'PT9901',
                id: 112,
              },
            ],
          },
        ],
        field190Options: [
          {
            label: '件',
            value: 1,
          },
          {
            label: '套',
            value: 2,
          },
          {
            label: '款',
            value: 3,
          },
        ],
        field191Options: [
          {
            label: '红',
            value: 1,
          },
          {
            label: '黄',
            value: 2,
          },
          {
            label: '蓝',
            value: 3,
          },
          {
            label: '黑',
            value: 4,
          },
          {
            label: '白',
            value: 5,
          },
          {
            label: '橙',
            value: 6,
          },
          {
            label: '绿',
            value: 7,
          },
          {
            label: '青',
            value: 8,
          },
          {
            label: '玫瑰金',
            value: 9,
          },
          {
            label: '玫瑰金',
            value: 10,
          },
          {
            label: '其它',
            value: 11,
          },
        ],
        field204Options: [
          {
            label: '货重*金价',
            value: 1,
          },
          {
            label: '数量*单价',
            value: 2,
          },
        ],
        field196Options: [
          {
            label: '是',
            value: 1,
          },
          {
            label: '否',
            value: 2,
          },
        ],
        field127Props: {
          multiple: false,
          label: 'label',
          value: 'value',
          children: 'children',
        },
        field205Props: {
          multiple: false,
          label: 'label',
          value: 'value',
          children: 'children',
        },
        tableDataCw: [
          {
            id: '1',
            name: 'A-2-4-1',
            smjz: '21',

          },
          {
            id: '2',
            name: 'A-2-4-2',
            smjz: '33',

          },

        ],
        tableDataZs: [
          {
            id: '1',
            name: '钻石',
            smjz: '20000',
            number: '1',
            ys: 'D',
            jd: 'FL',
            ct: '1231',
            xz: '公主方',
            qg: '完美',
            kfgh: '否',
            xsfdj: '100',
            xsfzj: '100',
            zsdj: '10000',
            zszj: '20000',
            price_sum: '10000',
          },
          {
            id: '2',
            name: '钻石',
            smjz: '40000',
            number: '1',
            ys: 'D',
            jd: 'FL',
            ct: '1231',
            xz: '圆形',
            qg: '一般',
            kfgh: '是',
            xsfdj: '100',
            xsfzj: '100',
            zsdj: '10000',
            zszj: '20000',
            price_sum: '10000',
          },
          {
            id: '3',
            name: '钻石',
            smjz: '50000',
            number: '1',
            ys: 'D',
            jd: 'FL',
            ct: '1231',
            xz: '公主方',
            qg: '完美',
            kfgh: '是',
            xsfdj: '100',
            xsfzj: '100',
            zsdj: '10000',
            zszj: '20000',
            price_sum: '10000',
          },
          {
            id: '4',
            name: '钻石',
            smjz: '20000',
            number: '1',
            ys: 'D',
            jd: 'FL',
            ct: '1231',
            xz: '公主方',
            qg: '完美',
            kfgh: '是',
            xsfdj: '100',
            xsfzj: '100',
            zsdj: '10000',
            zszj: '20000',
            price_sum: '10000',
          },
        ],
        tableDataFs: [
          {
            id: '1',
            name: '钻石',
            smjz: '20000',
            number: '1',
            ys: 'D',
            jd: 'FL',
            ct: '1231',
            xz: '公主方',
            qg: '完美',
            kfgh: '否',
            psf: '120',
            xsfdj: '100',
            xsfzj: '100',
            zsdj: '10000',
            zszj: '20000',
            price_sum: '10000',
          },
          {
            id: '2',
            name: '红宝石',
            smjz: '40000',
            number: '1',
            ys: 'D',
            jd: 'FL',
            ct: '5.005',
            xz: '圆形',
            qg: '一般',
            kfgh: '是',
            psf: '120',
            xsfdj: '100',
            xsfzj: '100',
            zsdj: '10000',
            zszj: '20000',
            price_sum: '10000',
          },
          {
            id: '3',
            name: '钻石',
            smjz: '50000',
            number: '2',
            ys: 'D',
            jd: 'FL',
            ct: '1',
            xz: '公主方',
            qg: '完美',
            kfgh: '是',
            psf: '130',
            xsfdj: '100',
            xsfzj: '100',
            zsdj: '10000',
            zszj: '20000',
            price_sum: '10000',
          },
          {
            id: '4',
            name: '钻石',
            smjz: '20000',
            number: '1',
            ys: 'D',
            jd: 'FL',
            ct: '1231',
            xz: '公主方',
            qg: '完美',
            kfgh: '是',
            psf: '150',
            xsfdj: '100',
            xsfzj: '100',
            zsdj: '10000',
            zszj: '20000',
            price_sum: '10000',
          },
        ],
        tableDataGjs: [
          {
            id: '1',
            name: '黄金',
            kfgh: '否',
            cs: '99%',
            ys: '黄',
            jjz: '121',
            ssjj: '10000',
            shl: '3',
            lhz: '4',
            gjszj: '20000',
            price_sum: '10000',
          },
          {
            id: '2',
            name: '铂金',
            kfgh: '是',
            cs: '99%',
            ys: '白',
            jjz: '1231',
            ssjj: '10000',
            shl: '3',
            lhz: '4',
            gjszj: '20000',
            price_sum: '10000',
          },
          {
            id: '3',
            name: '铂金',
            kfgh: '是',
            cs: '99%',
            ys: '白',
            jjz: '1231',
            ssjj: '10000',
            shl: '3',
            lhz: '4',
            gjszj: '20000',
            price_sum: '10000',
          },
        ],
        tableDataPj: [
          {
            id: '1',
            name: '配件1',
            namegjs: '黄金',
            kfgh: '否',
            cs: '99%',
            ys: '黄',
            jjz: '1231',
            gfdj: '234',
            gfzj: '444',
            gjsdj: '10000',
            gjszj: '20000',
            price_sum: '10000',
          },
          {
            id: '2',
            name: '配件2',
            namegjs: '铂金',
            kfgh: '是',
            cs: '99%',
            ys: '白',
            jjz: '1231',
            gjsdj: '10000',
            gjszj: '20000',
            price_sum: '10000',
          },
          {
            id: '3',
            name: '配件3',
            namegjs: '铂金',
            kfgh: '是',
            cs: '99%',
            ys: '白',
            jjz: '1231',
            gjsdj: '10000',
            gjszj: '20000',
            price_sum: '10000',
          },
        ],
      }
    },
    components: {
      'dialog-tools': 'url:../../tools/dialog-tools.vue',
      'genjin-jilu': 'url:../../data/genjin-jilu.vue',
      'dialog-search-customer': 'url:../search-customer.vue',
      'dialog-search-product': 'url:../search-product.vue',
      'upload-img-list': 'url:../../tools/upload-img-list.vue',
      'dialog-search-baojia': 'url:../search-baojia.vue',
    },
  }
</script>
